<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        {:build_toolbar('refresh,add,edit,del')}
                        <div class="dropdown btn-group">
                            <a class="btn btn-success btn-more dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> {:__('More')}</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a href="javascript:;" data-toggle="modal" data-target="#batch-modal"><i class="fa fa-cogs"></i> {:__('批量分配')}</a></li>
                            </ul>
                        </div>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('scanwork/allocation/edit')}" 
                           data-operate-del="{:$auth->check('scanwork/allocation/del')}" 
                           width="100%">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 批量分配模态框 -->
<div class="modal fade" id="batch-modal" tabindex="-1" role="dialog" aria-labelledby="batchModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="batchModalLabel">批量分配</h4>
            </div>
            <form id="batch-form" method="post">
                <div class="modal-body">
                    <div class="form-group">
                        <label>选择订单：</label>
                        <select name="order_id" class="form-control" id="batch-order-select" required>
                            <option value="">请选择订单</option>
                        </select>
                    </div>
                    <div id="batch-content" style="display: none;">
                        <div class="form-group">
                            <label>订单型号分配：</label>
                            <div id="batch-table-container">
                                <!-- 动态生成分配表格 -->
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="submit" class="btn btn-primary">保存</button>
                </div>
            </form>
        </div>
    </div>
</div> 